<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            background: red;
        }


        /* 并集选择器 */
        #p1,
        #div1 {
            background: orange;
        }
    </style>
</head>

<body>
    <p class="box" id="p1">段落</p>
    <div class="box" id="div1">块元素</div>
</body>

</html>